﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace MySite2.Services
{
    public interface IConfig
    {
        bool ReinitDatabase { get; }
    }

    public class Config : IConfig
    {
        /// <summary>
        /// Should I reinit database ?
        /// </summary>
        public bool ReinitDatabase
        {
            get
            {
                bool value;
                bool.TryParse(ConfigurationManager.AppSettings["ReinitDatabase"], out value);

                return value;
            }
        }
    }
}